package org.csu.jpetstore.domain;

public class Account {
    private String username;
    private String password;
    private String status;
    private String sex;
    private int age;
    private String email;
    private String phone;
    private String address1;
    private String address2;
    private String city;
    private String country;
    private String languagePreference;
    private String favouriteCategoryId;
    private String bannerName;

    public Account() {
        favouriteCategoryId = "Birds";
        status = "0";
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddress1() {
        return address1;
    }

    public void setAddress1(String address1) {
        this.address1 = address1;
    }

    public String getAddress2() {
        return address2;
    }

    public void setAddress2(String address2) {
        this.address2 = address2;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getLanguagePreference() {
        return languagePreference;
    }

    public void setLanguagePreference(String languagePreference) {
        this.languagePreference = languagePreference;
    }

    public String getFavouriteCategoryId() {
        return favouriteCategoryId;
    }

    public void setFavouriteCategoryId(String favouriteCategoryId) {
        this.favouriteCategoryId = favouriteCategoryId;
    }

    public String getBannerName() {
        return bannerName;
    }

    public void setBannerName(String bannerName) {
        this.bannerName = bannerName;
    }

    public String someEmpty(){
        if(username == null){
            return "用户名不能为空！";
        }else if(age < 18){
            return "您必须要满18周岁以上！";
        }else if(phone == null){
            return "电话号码不能为空！";
        }else if(email == null){
            return "电子邮件不能为空！";
        }else if(address1 == null){
            return "邮寄首地址不能为空！";
        }
        return null;
    }
    @Override
    public String toString() {
        return "Account{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                ", email='" + email + '\'' +
                ", phone='" + phone + '\'' +
                ", address1='" + address1 + '\'' +
                ", address2='" + address2 + '\'' +
                ", city='" + city + '\'' +
                ", country='" + country + '\'' +
                ", languagePreference='" + languagePreference + '\'' +
                ", favouriteCategoryId='" + favouriteCategoryId + '\'' +
                ", bannerName='" + bannerName + '\'' +
                '}';
    }
}
